/*
Copyright (C) 2021-2025 Casa Xu (also Zhiyan Xu) from HIT

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef HARDWARE_LAYER_INC_LOS_I2C_H_
#define HARDWARE_LAYER_INC_LOS_I2C_H_

#include "HL_i2c.h"

/** @def I2C_REPEATMODE
*   @brief 是否开启I2C重复模式
*
*   开启为1，不开启为0；若开启，则DataCount被屏蔽；否则DataCount会发挥作用
*/
#define I2C_REPEATMODE_R 1
#define I2C_REPEATMODE_NR 0



void LOS_I2C_Init(void);
void LOS_I2C_Transmit_M(uint8_t I2C_NUM, uint32_t length, uint8_t * data, uint32_t sadd);  //Master Sends Data
void LOS_I2C_Receive_M(uint8_t I2C_NUM, uint32_t length, uint8_t * data, uint32_t sadd);   //Master Receives Data
void I2C_SetRepeatMode(i2cBASE_t *i2c, uint8_t mode);

#endif 

